﻿using System.Collections.Generic;
using DAL;
using Model;

namespace BLL
{
    public class ClassService
    {
        private readonly ClassRepository _classRepository;

        public ClassService()
        {
            _classRepository = new ClassRepository();
        }

        public void AddClass(Class cls)
        {
            _classRepository.AddClass(cls);
        }

        public void DeleteClass(int classId)
        {
            _classRepository.DeleteClass(classId);
        }

        public void UpdateClass(Class cls)
        {
            _classRepository.UpdateClass(cls);
        }

        public List<Class> GetClasses(string name)
        {
            return _classRepository.SearchClassesByName(name);
        }
    }
}
